<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>SDL2_gfx: I:/Sources/sdl2gfx/SDL2_rotozoom.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">SDL2_gfx
   &#160;<span id="projectnumber">1.0.1</span>
   </div>
   <div id="projectbrief">GraphicsprimitivesandsurfacefunctionsforSDL2</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">I:/Sources/sdl2gfx/SDL2_rotozoom.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;math.h&gt;</code><br/>
<code>#include &quot;SDL.h&quot;</code><br/>
</div>
<p><a href="_s_d_l2__rotozoom_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr class="memitem:ae71449b1cc6e6250b91f539153a7a0d3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#ae71449b1cc6e6250b91f539153a7a0d3">M_PI</a>&#160;&#160;&#160;3.1415926535897932384626433832795</td></tr>
<tr class="memitem:a6541cd06edcce77d8a6f1c6350c988af"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a6541cd06edcce77d8a6f1c6350c988af">SMOOTHING_OFF</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:a6541cd06edcce77d8a6f1c6350c988af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable anti-aliasing (no smoothing).  <a href="#a6541cd06edcce77d8a6f1c6350c988af"></a><br/></td></tr>
<tr class="memitem:abeb6ae7618fcb315d0399fe65849a2e8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#abeb6ae7618fcb315d0399fe65849a2e8">SMOOTHING_ON</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:abeb6ae7618fcb315d0399fe65849a2e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable anti-aliasing (smoothing).  <a href="#abeb6ae7618fcb315d0399fe65849a2e8"></a><br/></td></tr>
<tr class="memitem:ab3316f8a2f78ed696bbe0242c75b6ee7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a>&#160;&#160;&#160;extern</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6f5f31a362f63370dc60049df14d6856"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a6f5f31a362f63370dc60049df14d6856">rotozoomSurface</a> (SDL_Surface *src, double angle, double zoom, int smooth)</td></tr>
<tr class="memdesc:a6f5f31a362f63370dc60049df14d6856"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface and optional anti-aliasing.  <a href="#a6f5f31a362f63370dc60049df14d6856"></a><br/></td></tr>
<tr class="memitem:a592d84489ce544c050a9f3fe0e04f3f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a592d84489ce544c050a9f3fe0e04f3f6">rotozoomSurfaceXY</a> (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)</td></tr>
<tr class="memdesc:a592d84489ce544c050a9f3fe0e04f3f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing.  <a href="#a592d84489ce544c050a9f3fe0e04f3f6"></a><br/></td></tr>
<tr class="memitem:a9097c513174e2d97603292c08a9db923"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a9097c513174e2d97603292c08a9db923">rotozoomSurfaceSize</a> (int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:a9097c513174e2d97603292c08a9db923"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing.">rotozoomSurface()</a> call.  <a href="#a9097c513174e2d97603292c08a9db923"></a><br/></td></tr>
<tr class="memitem:aa0126562efa572575e3962fe51d69e7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#aa0126562efa572575e3962fe51d69e7c">rotozoomSurfaceSizeXY</a> (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:aa0126562efa572575e3962fe51d69e7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call.  <a href="#aa0126562efa572575e3962fe51d69e7c"></a><br/></td></tr>
<tr class="memitem:a0867857132421429994198cabacb0528"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a0867857132421429994198cabacb0528">zoomSurface</a> (SDL_Surface *src, double zoomx, double zoomy, int smooth)</td></tr>
<tr class="memdesc:a0867857132421429994198cabacb0528"><td class="mdescLeft">&#160;</td><td class="mdescRight">Zoom a surface by independent horizontal and vertical factors with optional smoothing.  <a href="#a0867857132421429994198cabacb0528"></a><br/></td></tr>
<tr class="memitem:a87a121da75a099fd980295c759a7005d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a87a121da75a099fd980295c759a7005d">zoomSurfaceSize</a> (int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:a87a121da75a099fd980295c759a7005d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the size of the target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing.">zoomSurface()</a> call.  <a href="#a87a121da75a099fd980295c759a7005d"></a><br/></td></tr>
<tr class="memitem:a9adfe732cbca348e3287096e7c67e72d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#a9adfe732cbca348e3287096e7c67e72d">shrinkSurface</a> (SDL_Surface *src, int factorx, int factory)</td></tr>
<tr class="memdesc:a9adfe732cbca348e3287096e7c67e72d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shrink a surface by an integer ratio using averaging.  <a href="#a9adfe732cbca348e3287096e7c67e72d"></a><br/></td></tr>
<tr class="memitem:ac2858dec47549c8f82360568b5a29363"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l2__rotozoom_8h.html#ac2858dec47549c8f82360568b5a29363">rotateSurface90Degrees</a> (SDL_Surface *src, int numClockwiseTurns)</td></tr>
<tr class="memdesc:ac2858dec47549c8f82360568b5a29363"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates a 8/16/24/32 bit surface in increments of 90 degrees.  <a href="#ac2858dec47549c8f82360568b5a29363"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ae71449b1cc6e6250b91f539153a7a0d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="_s_d_l2__rotozoom_8h.html#ae71449b1cc6e6250b91f539153a7a0d3">M_PI</a>&#160;&#160;&#160;3.1415926535897932384626433832795</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00041">41</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab3316f8a2f78ed696bbe0242c75b6ee7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a>&#160;&#160;&#160;extern</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00070">70</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6541cd06edcce77d8a6f1c6350c988af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="_s_d_l2__rotozoom_8h.html#a6541cd06edcce77d8a6f1c6350c988af">SMOOTHING_OFF</a>&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Disable anti-aliasing (no smoothing). </p>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00051">51</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<a class="anchor" id="abeb6ae7618fcb315d0399fe65849a2e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="_s_d_l2__rotozoom_8h.html#abeb6ae7618fcb315d0399fe65849a2e8">SMOOTHING_ON</a>&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enable anti-aliasing (smoothing). </p>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8h_source.html#l00056">56</a> of file <a class="el" href="_s_d_l2__rotozoom_8h_source.html">SDL2_rotozoom.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ac2858dec47549c8f82360568b5a29363"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l2__rotozoom_8h.html#ac2858dec47549c8f82360568b5a29363">rotateSurface90Degrees</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numClockwiseTurns</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates a 8/16/24/32 bit surface in increments of 90 degrees. </p>
<p>Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since no scanning or interpolation takes place. Input surface must be 8/16/24/32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler)</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Source surface to rotate. </td></tr>
    <tr><td class="paramname">numClockwiseTurns</td><td>Number of clockwise 90 degree turns to apply to the source.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new, rotated surface; or NULL for surfaces with incorrect input format. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l00803">803</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a6f5f31a362f63370dc60049df14d6856"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l2__rotozoom_8h.html#a6f5f31a362f63370dc60049df14d6856">rotozoomSurface</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms a surface and optional anti-aliasing. </p>
<p>Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01035">1035</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9097c513174e2d97603292c08a9db923"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void <a class="el" href="_s_d_l2__rotozoom_8h.html#a9097c513174e2d97603292c08a9db923">rotozoomSurfaceSize</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing.">rotozoomSurface()</a> call. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01013">1013</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aa0126562efa572575e3962fe51d69e7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void <a class="el" href="_s_d_l2__rotozoom_8h.html#aa0126562efa572575e3962fe51d69e7c">rotozoomSurfaceSizeXY</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l00996">996</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a592d84489ce544c050a9f3fe0e04f3f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l2__rotozoom_8h.html#a592d84489ce544c050a9f3fe0e04f3f6">rotozoomSurfaceXY</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. </p>
<p>Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01056">1056</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9adfe732cbca348e3287096e7c67e72d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l2__rotozoom_8h.html#a9adfe732cbca348e3287096e7c67e72d">shrinkSurface</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shrink a surface by an integer ratio using averaging. </p>
<p>Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to shrink. </td></tr>
    <tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new, shrunken surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01512">1512</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a0867857132421429994198cabacb0528"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l2__rotozoom_8h.html#a0867857132421429994198cabacb0528">zoomSurface</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Zoom a surface by independent horizontal and vertical factors with optional smoothing. </p>
<p>Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to zoom. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new, zoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01361">1361</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a87a121da75a099fd980295c759a7005d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_s_d_l2__rotozoom_8h.html#ab3316f8a2f78ed696bbe0242c75b6ee7">SDL2_ROTOZOOM_SCOPE</a> void <a class="el" href="_s_d_l2__rotozoom_8h.html#a87a121da75a099fd980295c759a7005d">zoomSurfaceSize</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculates the size of the target surface for a <a class="el" href="_s_d_l2__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing.">zoomSurface()</a> call. </p>
<p>The minimum size of the target surface is 1. The input factors can be positive or negative.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The width of the source surface to zoom. </td></tr>
    <tr><td class="paramname">height</td><td>The height of the source surface to zoom. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>Pointer to an integer to store the calculated width of the zoomed target surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>Pointer to an integer to store the calculated height of the zoomed target surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l2__rotozoom_8c_source.html#l01311">1311</a> of file <a class="el" href="_s_d_l2__rotozoom_8c_source.html">SDL2_rotozoom.c</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
